package com.yunhe.common.client;

import com.yunhe.common.client.fallback.WebLogFallbackFactory;
import com.yunhe.common.model.ResultObject;
import com.yunhe.common.model.data.SystemMonitorLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 日志Feign客户端
 * 避免出现相同value的Feign，在value中添加“http://”
 * @author liuronglei
 */
@FeignClient(value = "http://yh-log", fallbackFactory = WebLogFallbackFactory.class)
public interface WebLogClient {

    /**
     * 新增系统日志记录
     * @param systemMonitorLog 系统日志记录对象
     */
    @RequestMapping(value = "/systemMonitorLogs", method = RequestMethod.POST)
    ResponseEntity<ResultObject> createSystemLog(@RequestBody SystemMonitorLog systemMonitorLog);
}
